package com.shelpe.services.auth.tokens;

import java.util.Collection;

import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

public class InternalAuthenticationToken extends AbstractAuthenticationToken {
	
	private String token;
	private String serviceID;

	public InternalAuthenticationToken(String serviceID, String token, Collection<? extends GrantedAuthority> authorities) {
		super(authorities);
		this.token = token;
		this.serviceID = serviceID;
	}

	private static final long serialVersionUID = 1L;

	@Override
	public Object getCredentials() {
		return this.token;
	}

	@Override
	public Object getPrincipal() {
		return this.serviceID;
	}

}
